-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphical TFT fixes, cleanup #20861
Graphical TFT fixes, cleanup #20861
Conversation
@rhapsodyv i let you try on the 480x320 ? |
@tpruvot Idea: instead of having a cursor to drawing, it would not be better to lcd_put_* just concatenate data to the current tft_string, and then we just add a new method to be called: tft.draw_current_string. With this approach, we just need add one call at the final of all lcd_put_* calls, instead of having to add customized lcd_move_to everywhere. What do you think? |
lcd_put_wchar_max needed for 480x320 too
MENU_ITEM_HEIGHT & adjust right column
86d9977
to
aafa846
Compare
I rebased + squashed the 2 last commits in one... There may be other screens to check i'm unable to test for now : Marlin/src/feature/power_monitor.cpp:60 (amps/volts/watts) will try also to print a matrix of all lines/columns, ive the feeling the rows are truncated... also lcd_put_int(int) is not implemented in color ui |
tested ok, but i still get crash/weird issue on a matrix test
with x<14 that displays it |
k, my test issue was stack problem when doing too much lcd_put_int(x) on the same row... x out of range tested ok & ignored so... 7x20 on 320x240 |
before merging, i think we can reenable Marlin/src/inc/SanityCheck.h:806 - #elif ENABLED(BABYSTEP_DISPLAY_TOTAL) && ANY(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)
- #error "New Color UI (TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI) does not support BABYSTEP_DISPLAY_TOTAL yet." code is similar, in Marlin/src/lcd/menu/menu_tune.cpp at least its built now... but didnt test in real conditions |
The sanity check is already enabled. |
yes, display is not perfect but its readable, erk was not easy to find it :p but Z Probe Babystep is ok need to start a print to access the tune menu... painful "last row" is not the good place i think... that overflow the buttons... and you increased the line height to 34... imo should be 30 or 32 (on 320x240) erk, code using lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL)); which doesnt increment our X cursor |
just void menu_pause_option(); to move and that build it |
Seemed like a good time to collect the common pieces in one place. More parts of those files can probably be moved into |
indeed, to avoid multiple edit on helper functions at least ;) |
else, this refactor didn't broke the display... tested ok |
I don't mind merging this for wider testing at this point…. |
…_bugfix * commit '876c2586b9146dd123af4c7b21138b8239ef5d39': (116 commits) Clean up MMU2 code (MarlinFirmware#20794) Init KILL, SUICIDE, PSU earlier (MarlinFirmware#20810) "Move … code" followup (MarlinFirmware#20869) Apply SEC_TO_MS and other fixes Reformat abortSDPrinting Fix sign warning (MarlinFirmware#20872) Cosmetic changes (2) (MarlinFirmware#20876) "Move … code" followup (MarlinFirmware#20868) "Move … code" followup (MarlinFirmware#20874) Graphical TFT fixes, cleanup (MarlinFirmware#20861) 🧻 Cosmetic changes (MarlinFirmware#20859) 🛠Fix deps script version regex Fix Ender 3 V2 DWIN manual move (MarlinFirmware#20837) [cron] Bump distribution date (2021-01-25) Fix LiquidCrystal CI failures (MarlinFirmware#20873) Revert "Adding custom move feedrate for G26 (MarlinFirmware#20729)" (MarlinFirmware#20870) MeatPack serial encoding (MarlinFirmware#20802) [cron] Bump distribution date (2021-01-24) lcd_put_wchar_max for COLOR_UI (MarlinFirmware#20838) Adding custom move feedrate for G26 (MarlinFirmware#20729) ... # Conflicts: # Marlin/Configuration.h # Marlin/Configuration_adv.h
Give this Anet ET5X/Anet TFT35 config a build. Rebased against c74f972 from ~40 mins ago. Full error output:Compiling .pio/build/Anet_ET4_OpenBLT/src/src/lcd/tft/ui_common.cpp.o
Compiling .pio/build/Anet_ET4_OpenBLT/src/src/lcd/tft_io/tft_io.cpp.o
In file included from Marlin/src/lcd/tft/../../inc/../core/boards.h:24,
from Marlin/src/lcd/tft/../../inc/MarlinConfigPre.h:37,
from Marlin/src/lcd/tft/tft_image.cpp:23:
Marlin/src/lcd/tft/tft_image.cpp:77:75: error: 'MARLIN_LOGO_FULL_SIZE' was not declared in this scope
77 | TERN(SHOW_BOOTSCREEN, TERN(BOOT_MARLIN_LOGO_SMALL, MarlinLogo195x59x16, MARLIN_LOGO_FULL_SIZE), NoLogo),
| ^~~~~~~~~~~~~~~~~~~~~
Marlin/src/lcd/tft/../../inc/../core/macros.h:443:26: note: in definition of macro 'THIRD'
443 | #define THIRD(a,b,c,...) c
| ^
Marlin/src/lcd/tft/../../inc/../core/macros.h:192:29: note: in expansion of macro '___TERN'
192 | #define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
| ^~~~Compiling .pio/build/Anet_ET4_OpenBLT/src/src/lcd/tft_io/touch_calibration.cpp.o
~~~
Marlin/src/lcd/tft/../../inc/../core/macros.h:191:29: note: in expansion of macro '__TERN'
191 | #define _TERN(E,V...) __TERN(_CAT(T_,E),V) // Prepend 'T_' to get 'T_0' or 'T_1'
| ^~~~~~
Marlin/src/lcd/tft/../../inc/../core/macros.h:187:29: note: in expansion of macro '_TERN'
187 | #define TERN(O,A,B) _TERN(_ENA_1(O),B,A) // OPTION converted to '0' or '1'
| ^~~~~
Marlin/src/lcd/tft/tft_image.cpp:77:3: note: in expansion of macro 'TERN'
77 | TERN(SHOW_BOOTSCREEN, TERN(BOOT_MARLIN_LOGO_SMALL, MarlinLogo195x59x16, MARLIN_LOGO_FULL_SIZE), NoLogo),
| ^~~~
Marlin/src/lcd/tft/../../inc/../core/macros.h:193:29: note: in expansion of macro 'THIRD'
193 | #define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B.
| ^~~~~
Marlin/src/lcd/tft/../../inc/../core/macros.h:192:29: note: in expansion of macro '___TERN'
192 | #define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
| ^~~~~~~
Marlin/src/lcd/tft/../../inc/../core/macros.h:191:29: note: in expansion of macro '__TERN'
191 | #define _TERN(E,V...) __TERN(_CAT(T_,E),V) // Prepend 'T_' to get 'T_0' or 'T_1'
| ^~~~~~
Marlin/src/lcd/tft/../../inc/../core/macros.h:187:29: note: in expansion of macro '_TERN'
187 | #define TERN(O,A,B) _TERN(_ENA_1(O),B,A) // OPTION converted to '0' or '1'
| ^~~~~
Marlin/src/lcd/tft/tft_image.cpp:77:25: note: in expansion of macro 'TERN'
77 | TERN(SHOW_BOOTSCREEN, TERN(BOOT_MARLIN_LOGO_SMALL, MarlinLogo195x59x16, MARLIN_LOGO_FULL_SIZE), NoLogo),
| ^~~~
Compiling .pio/build/Anet_ET4_OpenBLT/src/src/libs/buzzer.cpp.o
Compiling .pio/build/Anet_ET4_OpenBLT/src/src/libs/crc16.cpp.o
Compiling .pio/build/Anet_ET4_OpenBLT/src/src/libs/nozzle.cpp.o
Compiling .pio/build/Anet_ET4_OpenBLT/src/src/libs/numtostr.cpp.o
*** [.pio/build/Anet_ET4_OpenBLT/src/src/lcd/tft/tft_image.cpp.o] Error 1 #20861 appears to be the bug source according to a little I have |
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
lcd_put_wchar_max needed for 480x320 too
followup of #20838